import { Request, Response } from 'express';
import statisticalService from '../../services/statistical.service';
export class Controller {
    // 请求统计数据
    get(req: Request, res: Response): void {
        let type = Number(req.query.type as string)
        statisticalService.getCount(type).then((result)=>{
            res.status(200).json({ msg: 'ok', data: result })
        }).catch((error)=>{
            res.status(200).json({ msg: 'error', error: error })
        })
        
    }
}
export default new Controller();